import request from '@/common/request.js'
import {formatGetUri} from '@/common/util.js'

const api = {}
//app登录时 获取用户信息修改
api.getUdateInfo = params => request.globalRequest(`api/user/UpdateInfo`,'POST',params,1); 
//查询ish5的状态
api.getUserisInfo = params => request.globalRequest(`api/user/userish`,'POST',params,1); 
//获取用户信息接口 根据unionid 获取

api.getUnidMember = params => request.globalRequest(`api/user/GetMemberInfo`,'POST',params,1); 
//登录
api.getLogin = params => request.globalRequest(`api/user/login`,'POST',params,1); 
//注册
api.getRegister = params => request.globalRequest(`api/user/reg`,'POST',params,1); 
//获取验证码
api.getCode = params => request.globalRequest(`api/user/VerifySend`,'POST',params,1); 
// 调用首页轮播图接口
api.getSwiperList = params => request.globalRequest(`api/Banner/index`,'GET',params,1); 
// 调用首页商品标题接口
api.getGoodsTitleList = params => request.globalRequest(`api/Category/Index`,'GET',params,1);
// 调用首页商品列表接口
api.getGoodsList = params => request.globalRequest(`api/Bizpro/Index`,'POST',params,1);
// 调用首页轮播消息接口
api.getSwiperMsg = params => request.globalRequest(`api/apply/infolist`,'GET',params,1);
// 调用首页专区图标接口
api.getIcon = params => request.globalRequest(`api/Spearea/Index`,'GET',params,1);
// 调用首页满减活动接口
api.getActivityMsg = params => request.globalRequest(`api/FullReduction/Index`,`GET`,params,1); 
// 调用商品详情页轮播图接口
api.getDetailSwiperList = params => request.globalRequest(`api/Bizpro/Detail`,`GET`,params,1);
// 调用商品详情页商品详情接口
api.getGoodsDetail = params => request.globalRequest(`api/Bizpro/Detail`,`GET`,params,1);
// 调用商品详情页商品参数接口
api.getGoodsParams = params => request.globalRequest(`api/Bizpro/BizParams`,`GET`,params,1);
// 调用商品详情页商品规格接口
api.getGoodsSize = params => request.globalRequest(`api/Bizpro/StandardBase`,`GET`,params,1);
// 调用我的页浏览记录接口
api.getUserHistory = params => request.globalRequest(`api/user/LogBrowse`,`GET`,params,1);
// 调用我的页账号设置接口(获取验证码和手机号)
api.getUserInfo = params => request.globalRequest(`api/user/ResetInfo`,`POST`,params,1);
// 调用我的商家入驻接口
api.merchantsSettled = params => request.globalRequest(`api/Supplier/AddInfo`,`POST`,params,1);
//


// 调用点击加入购物车接口
api.paramsToCart = params => request.globalRequest(`api/Cart/Save`,`POST`,params,1);
// 调用我的购物车列表接口
api.getMyCartList = params => request.globalRequest(`api/cart/index`,`GET`,params,1);
// 动态修改购物车信息
api.cartSave = params => request.globalRequest(`api/Cart/Save`,`POST`,params,1);
//购物车删除 
api.cartDelete = params => request.globalRequest(`api/Cart/Delete`,`POST`,params,1);
//广告图
api.getAdvert = params => request.globalRequest(`api/advert/GetAdvert`,`GET`,params,1);

/* 调用我的页 */
//联系客服
api.getMinePhone = params => request.globalRequest(`api/apply/ServiceInfo`);
// 消费记录
api.getMineSale = params => request.globalRequest(`api/mine/getMineSale`);
//平台协议
api.getMineProtocol = params => request.globalRequest(`api/apply/PlatProtocol`,'GET',params,1);
//订单列表  待付款 历史订单 1 
api.getMineorderList = params => request.globalRequest(`api/mine/getMineorderList`,'POST',params,1); 
//订单 列表  待发货 运输中 2 34
api.getMineOrder = params => request.globalRequest(`api/mine/getMineOrder`,'POST',params,1); 
//待发货订单： 订单详情
api.getOrderDetail = params => request.globalRequest(`api/order/OrderDetail`,'GET',params,1);
//待发货订单：提醒发货
api.getSaveInfo = params => request.globalRequest(`api/order/SaveInfo`,'POST',params,1);
//我的页 订单 取消订单
api.getOrderDetail = params => request.globalRequest(`api/order/OrderDetail`,'GET',params,1);
//查看物流
api.getOrderLogistic = params => request.globalRequest(`api/order/ExpressDetail`,'GET',params,1);
//确认收货
api.toOrderConfirm = params => request.globalRequest(`api/mine/getConfirmReceipt`,'POST',params,1);
/* 订单确认 */
//确认订单页
api.getOrderConfirm = params => request.globalRequest(`api/order/getConfirm`,'POST',params,1);
//取消订单
api.getcancelOrder = params => request.globalRequest(`api/order/CancelMo`,'POST',params,1);
//点击确认支付 修改订单信息
api.getConfirmPay = params => request.globalRequest(`api/order/getConfirmPay`,'POST',params,1);
//请求商品详情点击立即购买 和 购物车下单时
api.getCheckOrder = params => request.globalRequest(`api/order/getCheckOrder`,'POST',params,1);
//根据规格查询价位
api.getStandardPrice = params => request.globalRequest(`api/Bizpro/StandardPrice`,'POST',params,1);
//订单确认页 修改数量
api.getOrderWriteNum = params => request.globalRequest(`api/order/orderWriteNum`,'POST',params,1);

//请求我的页订单数量 
api.GetOrderCount = params => request.globalRequest(`api/mine/GetOrderCount`,'POST',params,1);

//支付
api.gettoPay = params => request.globalRequest(`api/order/ordersPay`,'POST',params,1);
//获取版本号
api.getVersion = params => request.globalRequest(`api/mine/testVersion`,'GET',params,1);
//获取保存的图片
api.getSareImgurl = params => request.globalRequest(`api/mine/shareImgurl`,'GET',params,1);







//广告图  首页  我的页
api.getAdvert = params => request.globalRequest(`api/advert/GetAdvert`,'GET',params,1);





export default api